﻿namespace WholeSlideImageLibrary.Formats.OptimizedPyramidTiledImage
{
    internal struct FileTileCollectionPointerBlock
    {
        public FileTileCollectionPointerBlock(int width, int height, int tileAcross, int tileDown, long tileCollectionBlockPointer)
        {
            Width = width;
            Height = height;
            TileAcross = tileAcross;
            TileDown = tileDown;
            TileCollectionBlockPointer = tileCollectionBlockPointer;
        }

        public FileTileCollectionPointerBlock(int width, int height, int tileSize, long tileCollectionBlockPointer)
        {
            Width = width;
            Height = height;
            TileAcross = (width + tileSize - 1) / tileSize;
            TileDown = (height + tileSize - 1) / tileSize;
            TileCollectionBlockPointer = tileCollectionBlockPointer;
        }

        public int Width { get; }
        public int Height { get; }
        public int TileAcross { get; }
        public int TileDown { get; }
        public long TileCollectionBlockPointer { get; }
    }
}
